package cn.edu.scau.chenmiaopeng.singleton;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.scene.control.Button;
import javafx.scene.control.Label;

import javafx.event.ActionEvent;

public class MyController {
    @FXML
    private TextField textfield;
    @FXML
    private Button button;
    @FXML
    private Label label;
    @FXML
    public void clickButton(ActionEvent e) {  //createInstance()
    	String chairmanName = textfield.getText();
    	Chairman chairmanInstance = Chairman.getInstance(chairmanName);
    	label.setText(chairmanInstance.toString());
    }
}
